package jwt;

import io.jsonwebtoken.Claims;
import io.jsonwebtoken.Jwts;

public class ParseJwtTest {
    public static void main(String[] args) {
        String token = "eyJhbGciOiJIUzI1NiJ9.eyJqdGkiOiIwMDEiLCJzdWIiOiLlsI_nmb0iLCJpYXQiOjE1NzA0MTQzOTB9.F1s9dEkzcL6_Xn_kse5vNZgNsAipvbMQ4UPoRTK6phs";
        Claims claims = Jwts.parser().setSigningKey("doublefuns").parseClaimsJws(token).getBody();
        System.out.println("id:" + claims.getId());
        System.out.println("subject" + claims.getSubject());
        System.out.println("IssuedAt" + claims.getIssuedAt());
    }
}
